﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<FacialClub.Models.ViewModels.CustomerViewModel>" %>
<%@ Import Namespace="FacialClub.Helpers" %>
	<%: Html.ValidationSummaryJQuery("Please fix these errors.", new Dictionary<string, object> { { "id", "valSumId" } })%>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
    <% ViewContext.FormContext.ValidationSummaryId = "valSumId"; %>
  <div>
    <fieldset>
    <legend>Account Information</legend>
    <table align="left" cellspacing="4" width="100%">
      <tr>
        <td><div class="editor-label"> First Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.FirstName) %>
            <%: Html.ValidationMessageFor(model => model.Customer.FirstName, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Last Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.LastName)%>
            <%: Html.ValidationMessageFor(model => model.Customer.LastName, "*")%>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Birth Date </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.BirthDate, new { style = "width:170px" })%>
            <%: Html.ValidationMessageFor(model => model.Customer.BirthDate, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Email </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Email) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Email,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Phone </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Telephone) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Telephone, "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Fax </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Fax) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Fax,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Address </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Address)%>
            <%: Html.ValidationMessageFor(model => model.Customer.Address,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> Town/City </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.City) %>
            <%: Html.ValidationMessageFor(model => model.Customer.City,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Postal Code </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.PostalCode) %>
            <%: Html.ValidationMessageFor(model => model.Customer.PostalCode,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> State </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.State) %>
            <%: Html.ValidationMessageFor(model => model.Customer.State,"*") %>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Country </div></td>
        <td><div class="editor-field">
            <%: Html.TextBoxFor(model => model.Customer.Country) %>
            <%: Html.ValidationMessageFor(model => model.Customer.Country,"*") %>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> User Name </div></td>
        <td><div class="editor-field">
            <%: Html.TextBox("UserName")%>
            <%: Html.ValidationMessage("UserName", "*")%>
          </div></td>
      </tr>
      <tr>
        <td><div class="editor-label"> Password </div></td>
        <td><div class="editor-field">
            <%: Html.Password("Password")%>
            <%: Html.ValidationMessage("Password", "*")%>
          </div></td>
        <td>&nbsp;</td>
        <td><div class="editor-label"> ConfirmPassword </div></td>
        <td><div class="editor-field">
            <%: Html.Password("ConfirmPassword")%>
            <%: Html.ValidationMessage("ConfirmPassword", "*")%>
          </div></td>
      </tr>
      <tr>
        <td>
            <input type="submit" value="Register" />
          </td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </fieldset>
  </div>
  <% } %>
